import request from '@/services/request'

// 获取我的积分
export const getPublishSource = async () => {
  return await request.get('/user/v1/mine_points')
}

// 获取每日积分任务
export const getDailyTasks = async () => {
  return await request.get('/user/v1/points/day')
}

// 积分兑换列表
export const getTaskConvertList = async () => {
  return await request.get('/user/v1/points_exchange/list')
}

// 兑换权益
export const convertScore = async data => {
  return await request.post('/user/v1/points/exchange', data)
}

//积分明细
export const scoreDetail = async data => {
  return await request.get('/user/v1/points/detail_list', data)
}

// 任务上报
export const taskFinished = async (data, options) => {
  return await request.post('/user/v1/points/report', data, options)
}

// 获取注册兑换数据
export const getLoginConvertData = async () => {
  return await request.get('/user/v1/point/pop')
}
